summaryrefslogtreecommitdiffstats
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 6061602d7..83056bf61 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -8,6 +8,20 @@
#include <csignal>
#include <stdlib.h>
+#ifdef ANDROID
+ // Workaround for Android NDK builds that do not support std::to_string
+ namespace std
+ {
+ template <typename T>
+ std::string to_string(T Value)
+ {
+ std::ostringstream TempStream;
+ TempStream << Value;
+ return TempStream.str();
+ }
+ }
+#endif
+
#ifdef _MSC_VER
#include <dbghelp.h>
#endif // _MSC_VER
@@ -223,14 +237,11 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
// Initialize LibEvent:
cNetworkSingleton::Get().Initialise();
- #if !defined(ANDROID_NDK)
try
- #endif
{
cRoot Root;
Root.Start(std::move(a_OverridesRepo));
}
- #if !defined(ANDROID_NDK)
catch (std::exception & e)
{
LOGERROR("Standard exception: %s", e.what());
@@ -239,7 +250,6 @@ static void UniversalMain(std::unique_ptr<cSettingsRepositoryInterface> a_Overri
{
LOGERROR("Unknown exception!");
}
- #endif
// Shutdown all of LibEvent:
cNetworkSingleton::Get().Terminate();